home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/950 MIME Email (1.0)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 6c 61 6e 67 2e 63 2b | 2b 0a 50 61 74 68 3a 20 |.lang.c+|+.Path: |
|00000020| 6e 65 77 73 2e 6e 65 72 | 2e 62 62 6e 70 6c 61 6e |news.ner|.bbnplan|
|00000030| 65 74 2e 6e 65 74 21 61 | 72 63 6f 21 75 73 65 6e |et.net!a|rco!usen|
|00000040| 65 74 0a 46 72 6f 6d 3a | 20 42 72 69 61 6e 20 4c |et.From:| Brian L|
|00000050| 65 61 63 68 20 3c 6c 61 | 73 62 66 6c 3e 0a 53 75 |each <la|sbfl>.Su|
|00000060| 62 6a 65 63 74 3a 20 52 | 65 3a 20 43 6f 6d 70 61 |bject: R|e: Compa|
|00000070| 72 69 6e 67 20 53 74 72 | 75 63 74 20 65 6c 65 6d |ring Str|uct elem|
|00000080| 65 6e 74 73 0a 58 2d 4e | 6e 74 70 2d 50 6f 73 74 |ents.X-N|ntp-Post|
|00000090| 69 6e 67 2d 48 6f 73 74 | 3a 20 31 33 36 2e 32 32 |ing-Host|: 136.22|
|000000a0| 36 2e 31 31 36 2e 31 0a | 43 6f 6e 74 65 6e 74 2d |6.116.1.|Content-|
|000000b0| 54 79 70 65 3a 20 74 65 | 78 74 2f 70 6c 61 69 6e |Type: te|xt/plain|
|000000c0| 3b 20 63 68 61 72 73 65 | 74 3d 75 73 2d 61 73 63 |; charse|t=us-asc|
|000000d0| 69 69 0a 4d 65 73 73 61 | 67 65 2d 49 44 3a 20 3c |ii.Messa|ge-ID: <|
|000000e0| 44 4d 32 6e 32 70 2e 39 | 71 4c 40 6e 65 77 73 2e |DM2n2p.9|qL@news.|
|000000f0| 61 72 63 6f 2e 63 6f 6d | 3e 0a 54 6f 3a 20 62 68 |arco.com|>.To: bh|
|00000100| 61 72 64 77 61 6a 40 63 | 63 73 2e 6e 65 75 2e 65 |ardwaj@c|cs.neu.e|
|00000110| 64 75 0a 53 65 6e 64 65 | 72 3a 20 75 73 65 6e 65 |du.Sende|r: usene|
|00000120| 74 40 6e 65 77 73 2e 61 | 72 63 6f 2e 63 6f 6d 0a |t@news.a|rco.com.|
|00000130| 43 6f 6e 74 65 6e 74 2d | 54 72 61 6e 73 66 65 72 |Content-|Transfer|
|00000140| 2d 45 6e 63 6f 64 69 6e | 67 3a 20 37 62 69 74 0a |-Encodin|g: 7bit.|
|00000150| 4f 72 67 61 6e 69 7a 61 | 74 69 6f 6e 3a 20 41 52 |Organiza|tion: AR|
|00000160| 43 4f 20 4f 69 6c 20 25 | 20 47 61 73 20 43 6f 6d |CO Oil %| Gas Com|
|00000170| 70 61 6e 79 0a 52 65 66 | 65 72 65 6e 63 65 73 3a |pany.Ref|erences:|
|00000180| 20 3c 34 65 6f 31 76 61 | 24 73 36 6b 40 63 61 6d | <4eo1va|$s6k@cam|
|00000190| 65 6c 6f 74 2e 63 63 73 | 2e 6e 65 75 2e 65 64 75 |elot.ccs|.neu.edu|
|000001a0| 3e 0a 4d 69 6d 65 2d 56 | 65 72 73 69 6f 6e 3a 20 |>.Mime-V|ersion: |
|000001b0| 31 2e 30 0a 44 61 74 65 | 3a 20 54 68 75 2c 20 31 |1.0.Date|: Thu, 1|
|000001c0| 20 46 65 62 20 31 39 39 | 36 20 30 30 3a 33 37 3a | Feb 199|6 00:37:|
|000001d0| 33 37 20 47 4d 54 0a 58 | 2d 4d 61 69 6c 65 72 3a |37 GMT.X|-Mailer:|
|000001e0| 20 4d 6f 7a 69 6c 6c 61 | 20 31 2e 31 32 20 28 58 | Mozilla| 1.12 (X|
|000001f0| 31 31 3b 20 49 3b 20 48 | 50 2d 55 58 20 41 2e 30 |11; I; H|P-UX A.0|
|00000200| 39 2e 30 35 20 39 30 30 | 30 2f 37 35 35 29 0a 58 |9.05 900|0/755).X|
|00000210| 2d 55 72 6c 3a 20 6e 65 | 77 73 3a 34 65 6f 31 76 |-Url: ne|ws:4eo1v|
|00000220| 61 24 73 36 6b 40 63 61 | 6d 65 6c 6f 74 2e 63 63 |a$s6k@ca|melot.cc|
|00000230| 73 2e 6e 65 75 2e 65 64 | 75 0a 0a 62 68 61 72 64 |s.neu.ed|u..bhard|
|00000240| 77 61 6a 40 63 63 73 2e | 6e 65 75 2e 65 64 75 20 |waj@ccs.|neu.edu |
|00000250| 28 73 61 75 72 61 62 68 | 20 62 68 61 72 64 77 61 |(saurabh| bhardwa|
|00000260| 6a 29 20 77 72 6f 74 65 | 3a 0a 3e 48 65 6c 6c 6f |j) wrote|:.>Hello|
|00000270| 2c 0a 3e 0a 3e 49 27 76 | 65 20 62 65 65 6e 20 74 |,.>.>I'v|e been t|
|00000280| 72 79 69 6e 67 20 74 6f | 20 63 6f 6d 70 61 72 65 |rying to| compare|
|00000290| 20 73 74 72 75 63 74 75 | 72 65 20 65 6c 65 6d 65 | structu|re eleme|
|000002a0| 6e 74 73 20 75 73 69 6e | 67 20 74 68 65 20 69 66 |nts usin|g the if|
|000002b0| 20 53 74 61 74 65 6d 65 | 6e 74 2e 20 20 48 65 72 | Stateme|nt. Her|
|000002c0| 65 0a 3e 69 73 20 74 68 | 65 20 63 6f 64 65 3a 0a |e.>is th|e code:.|
|000002d0| 3e 0a 3e 0a 3e 64 6f 75 | 62 6c 65 20 4e 75 6d 65 |>.>.>dou|ble Nume|
|000002e0| 72 69 63 56 61 6c 28 43 | 6c 61 73 73 52 65 63 26 |ricVal(C|lassRec&|
|000002f0| 20 4c 65 74 47 72 61 64 | 65 29 7b 0a 3e 0a 3e 63 | LetGrad|e){.>.>c|
|00000300| 6f 75 74 20 3c 3c 20 22 | 61 73 73 67 6e 69 6e 67 |out << "|assgning|
|00000310| 20 73 74 72 75 63 74 20 | 6d 65 6d 62 65 72 20 75 | struct |member u|
|00000320| 73 69 6e 20 2e 20 22 20 | 3c 3c 20 4c 65 74 47 72 |sin . " |<< LetGr|
|00000330| 61 64 65 2e 0a 3e 47 72 | 61 64 65 20 3c 3c 20 27 |ade..>Gr|ade << '|
|00000340| 5c 6e 27 3b 0a 3e 69 66 | 28 4c 65 74 47 72 61 64 |\n';.>if|(LetGrad|
|00000350| 65 2e 47 72 61 64 65 20 | 3d 3d 20 22 41 22 29 20 |e.Grade |== "A") |
|00000360| 72 65 74 75 72 6e 28 34 | 2e 30 30 30 29 3b 0a 3e |return(4|.000);.>|
|00000370| 65 6c 73 65 20 69 66 28 | 4c 65 74 47 72 61 64 65 |else if(|LetGrade|
|00000380| 2e 47 72 61 64 65 20 3d | 3d 20 22 41 2d 22 29 20 |.Grade =|= "A-") |
|00000390| 72 65 74 75 72 6e 28 33 | 2e 36 36 36 29 3b 0a 3e |return(3|.666);.>|
|000003a0| 65 6c 73 65 20 69 66 28 | 4c 65 74 47 72 61 64 65 |else if(|LetGrade|
|000003b0| 2e 47 72 61 64 65 20 3d | 3d 20 22 42 2b 22 29 20 |.Grade =|= "B+") |
|000003c0| 72 65 74 75 72 6e 28 33 | 2e 33 33 33 29 3b 0a 3e |return(3|.333);.>|
|000003d0| 65 6c 73 65 20 72 65 74 | 75 72 6e 20 30 3b 0a 3e |else ret|urn 0;.>|
|000003e0| 7d 0a 3e 0a 3e 77 68 65 | 72 65 20 4c 65 74 47 72 |}.>.>whe|re LetGr|
|000003f0| 61 64 65 20 69 73 20 74 | 68 65 20 66 6f 6c 6c 6f |ade is t|he follo|
|00000400| 77 69 6e 67 20 73 74 72 | 75 63 74 3a 0a 3e 0a 3e |wing str|uct:.>.>|
|00000410| 73 74 72 75 63 74 20 43 | 6c 61 73 73 52 65 63 20 |struct C|lassRec |
|00000420| 7b 0a 3e 20 20 20 20 20 | 63 68 61 72 20 47 72 61 |{.> |char Gra|
|00000430| 64 65 5b 33 5d 3b 0a 3e | 20 20 20 20 20 69 6e 74 |de[3];.>| int|
|00000440| 20 20 20 51 48 3b 0a 3e | 20 20 20 20 20 63 68 61 | QH;.>| cha|
|00000450| 72 20 4e 61 6d 65 5b 31 | 30 5d 3b 0a 3e 20 20 20 |r Name[1|0];.> |
|00000460| 20 20 7d 3b 0a 3e 0a 3e | 49 20 63 61 6e 27 74 20 | };.>.>|I can't |
|00000470| 73 65 65 6d 20 74 6f 20 | 63 6f 6d 70 61 72 65 20 |seem to |compare |
|00000480| 74 68 65 20 65 6c 65 6d | 65 6e 74 73 20 6f 66 20 |the elem|ents of |
|00000490| 74 68 65 20 47 72 61 64 | 65 5b 33 5d 20 77 69 74 |the Grad|e[3] wit|
|000004a0| 68 20 22 41 22 20 6f 72 | 20 22 41 2d 22 20 6f 72 |h "A" or| "A-" or|
|000004b0| 20 22 42 2b 22 0a 3e 54 | 68 65 20 66 75 6e 63 74 | "B+".>T|he funct|
|000004c0| 69 6f 6e 20 69 6e 76 61 | 72 69 61 62 6c 65 20 72 |ion inva|riable r|
|000004d0| 65 74 75 72 6e 73 20 30 | 2e 20 20 49 27 76 65 20 |eturns 0|. I've |
|000004e0| 61 6c 73 6f 20 74 72 69 | 65 64 20 75 73 69 6e 67 |also tri|ed using|
|000004f0| 20 74 68 65 20 2d 3e 20 | 6f 70 65 72 61 74 6f 72 | the -> |operator|
|00000500| 2e 20 20 49 74 0a 3e 64 | 6f 65 73 6e 27 74 20 77 |. It.>d|oesn't w|
|00000510| 6f 72 6b 20 65 69 74 68 | 65 72 21 21 21 20 20 20 |ork eith|er!!! |
|00000520| 41 6e 79 6f 6e 65 20 6b | 6e 6f 77 20 77 68 79 3f |Anyone k|now why?|
|00000530| 3f 3f 20 20 49 27 6c 6c | 20 61 70 70 72 65 63 69 |?? I'll| appreci|
|00000540| 61 74 65 20 61 6e 79 20 | 68 65 6c 70 2e 0a 3e 0a |ate any |help..>.|
|00000550| 3e 09 09 09 09 09 09 74 | 68 61 6e 6b 73 0a 3e 09 |>......t|hanks.>.|
|00000560| 09 09 09 09 09 73 61 75 | 72 61 62 68 0a 53 61 75 |.....sau|rabh.Sau|
|00000570| 72 61 62 68 2c 0a 0a 59 | 6f 75 20 61 72 65 20 6d |rabh,..Y|ou are m|
|00000580| 61 6b 69 6e 67 20 74 68 | 65 20 63 6c 61 73 73 69 |aking th|e classi|
|00000590| 63 20 6d 69 73 74 61 6b | 65 3a 20 79 6f 75 20 61 |c mistak|e: you a|
|000005a0| 72 65 20 63 6f 6d 70 61 | 72 69 6e 67 20 70 6f 69 |re compa|ring poi|
|000005b0| 6e 74 65 72 73 2c 20 6e | 6f 74 20 73 74 72 69 6e |nters, n|ot strin|
|000005c0| 67 73 2e 0a 59 6f 75 20 | 6d 69 67 68 74 20 77 61 |gs..You |might wa|
|000005d0| 6e 74 20 74 6f 20 66 69 | 6e 64 20 61 20 62 65 67 |nt to fi|nd a beg|
|000005e0| 69 6e 6e 69 6e 67 20 43 | 20 6f 72 20 43 2b 2b 20 |inning C| or C++ |
|000005f0| 62 6f 6f 6b 20 61 6e 64 | 20 6c 6f 6f 6b 20 61 74 |book and| look at|
|00000600| 20 69 74 73 20 64 69 73 | 63 75 73 73 69 6f 6e 20 | its dis|cussion |
|00000610| 6f 6e 0a 61 72 72 61 79 | 73 20 61 6e 64 20 70 6f |on.array|s and po|
|00000620| 69 6e 74 65 72 73 2e 20 | 57 68 61 74 20 79 6f 75 |inters. |What you|
|00000630| 20 72 65 61 6c 6c 79 20 | 77 61 6e 74 20 69 73 3a | really |want is:|
|00000640| 0a 0a 69 66 28 73 74 72 | 63 6d 70 28 4c 65 74 47 |..if(str|cmp(LetG|
|00000650| 72 61 64 65 2e 47 72 61 | 64 65 2c 20 22 41 22 29 |rade.Gra|de, "A")|
|00000660| 20 3d 3d 20 30 20 29 20 | 72 65 74 75 72 6e 20 34 | == 0 ) |return 4|
|00000670| 2e 30 3b 0a 65 6c 73 65 | 20 69 66 20 28 20 73 74 |.0;.else| if ( st|
|00000680| 72 63 6d 70 28 4c 65 74 | 47 72 61 64 65 2e 47 72 |rcmp(Let|Grade.Gr|
|00000690| 61 64 65 20 3d 3d 20 22 | 41 2d 22 20 29 20 72 65 |ade == "|A-" ) re|
|000006a0| 74 75 72 6e 20 33 2e 36 | 36 36 3b 20 0a 0a 65 74 |turn 3.6|66; ..et|
|000006b0| 63 2e 0a 0a 2d 42 72 69 | 61 6e 20 3a 2d 29 0a 0a |c...-Bri|an :-)..|
+--------+-------------------------+-------------------------+--------+--------+